package com.yc.ssq.servlet;

import com.yc.ssq.Util.Utils;
import com.yc.ssq.dao.SsqDao;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.annotation.*;
import java.io.IOException;
import java.util.List;
import java.util.Map;

@WebServlet(name = "QxtServlet", value = "/qxt.s")
public class QxtServlet extends HttpServlet {
    SsqDao dao = new SsqDao();
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        String year = request.getParameter("year");

        List<Map<String, Object>> data = dao.selectQxt(year);

        Utils.writeJson(data, response);


    }


}
